//
//  String+Extend.swift
//  CMCCIOTSwift
//
//  Created by isoftstone on 2017/4/18.
//  Copyright © 2017年 isoftstone. All rights reserved.
//

import Foundation
import UIKit
extension String{
    
    subscript (r: Range<Int>) -> String {
        get {
            let startIndex = self.index(self.startIndex, offsetBy: r.lowerBound)
            let endIndex = self.index(self.startIndex, offsetBy: r.upperBound)
            
            return self[startIndex..<endIndex]
        }
    }
}
